<?php
	
	$this->load->helper('captcha');
	$this->load->library('session');
	$temp = md5(mktime() * microtime());
	$text = substr($temp,0,10);
	
	$vals = array(
	    'word' => $text,
	    'img_path' => 'public/images/captcha/',//duong dan luu file anh 
	    'img_url' => base_url().'public/images/captcha/',//duong dan de mo file anh
	    'font_path' => 'public/font/arial.ttf',
	    'img_width' => '200',
	    'img_height' => '50',
	    'expiration' => '0'
	);
	$this->session->set_userdata('word',$text);
	$cap = create_captcha($vals);
	echo $cap['image'];